import { makeAutoObservable } from 'mobx';

class AppStore {
    loading: boolean = false;

    alertStatus: boolean = false;

    alertTip: string = '';

    constructor() {
        makeAutoObservable(this);
    }

    setLoading(loading: boolean) {
        this.loading = loading;
    }

    showAlert(alertTip: string) {
        this.alertStatus = true;
        this.alertTip = alertTip;
    }

    hideAlert() {
        this.alertStatus = false;
        this.alertTip = '';
    }
}
const appStore = new AppStore();

export default appStore;
